package com.cml.common.dto.entity;

/**
 * 姓名：陈茂林
 * 时间：2023/10/11 14:44
 * 描述：
 */
public class SoltMetadata implements Cloneable{

    private Integer serverNodeId;
    private Integer startSlot;
    private Integer endSlot;

    private Boolean isReplicas=false;
    private Integer replicasTargetServerNode;

    public Integer getStartSlot() {
        return startSlot;
    }

    public void setStartSlot(Integer startSlot) {
        this.startSlot = startSlot;
    }

    public Integer getEndSlot() {
        return endSlot;
    }

    public void setEndSlot(Integer endSlot) {
        this.endSlot = endSlot;
    }
    public Integer getServerNodeId() {
        return serverNodeId;
    }

    public void setServerNodeId(Integer serverNodeId) {
        this.serverNodeId = serverNodeId;
    }

    public Boolean getReplicas() {
        return isReplicas;
    }

    public void setReplicas(Boolean replicas) {
        isReplicas = replicas;
    }

    public Integer getReplicasTargetServerNode() {
        return replicasTargetServerNode;
    }

    public void setReplicasTargetServerNode(Integer replicasTargetServerNode) {
        this.replicasTargetServerNode = replicasTargetServerNode;
    }

    @Override
    public String toString() {
        return "SoltMetadata{" +
                "serverNodeId=" + serverNodeId +
                ", startSlot=" + startSlot +
                ", endSlot=" + endSlot +
                ", isReplicas=" + isReplicas +
                ", replicasTargetServerNode=" + replicasTargetServerNode +
                '}';
    }

    @Override
    public SoltMetadata clone() throws CloneNotSupportedException {
        SoltMetadata  soltMetadata = new SoltMetadata();
        soltMetadata.setServerNodeId(this.getServerNodeId());
        soltMetadata.setStartSlot(this.getStartSlot());
        soltMetadata.setEndSlot(this.getEndSlot());
        soltMetadata.setReplicasTargetServerNode(this.replicasTargetServerNode);
        soltMetadata.setReplicas(this.getReplicas());
        return soltMetadata;
    }
}
